import { request } from '../utils/request'
import { User } from '../type/user'

export const login = (data: { loginname: string; password: string }) => {
  return request<{ token: string }>({
    url: 'user/login',
    method: 'POST',
    data
  })
}
